package cn.rkylin.oms.goods.dao;

import cn.rkylin.core.IDataBaseFactory;
import cn.rkylin.oms.goods.domain.GoodsSku;
import cn.rkylin.oms.item.domain.Item;
import cn.rkylin.oms.item.vo.ItemVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * 系统商品数据访问层
 *
 * @author wangxing
 * @version 1.0.0
 * @created 2017-7-5
 */
@Repository(value = "goodsDAO")
public class GoodsDAOImpl implements IGoodsDAO {

    @Autowired
    protected IDataBaseFactory dao;

    /**
     * 构造函数
     */
    public GoodsDAOImpl() {

    }

    @Override
    public GoodsSku getGoodsSkuBySkuId(String skuId) throws Exception {
        GoodsSku parameter = new GoodsSku();
        parameter.setSkuId(skuId);
        GoodsSku sku = (GoodsSku) dao.find("selectByPrimaryKeyGoodsSku", parameter);
        return sku;
    }
}
